import { createRouter, createWebHashHistory } from 'vue-router'
import LayoutView from '../views/LayoutView.vue'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: LayoutView,
      children: [
        {
          path: '',
          component: HomeView
        },
        {
          path: 'register',
          component: () => import('@/views/register/Index.vue')
        },
        {
          path: 'about',
          component: () => import('@/views/AboutView.vue')
        },
        {
          path: 'contact_us',
          component: () => import('@/views/ContactUsView.vue')
        },
        {
          path: 'login',
          component: () => import('@/views/LoginView.vue')
        }
      ]
    },
    {
      path: '/jrcp',
      component: LayoutView,
      children: [
        { path: '', component: () => import('@/views/jin_rong_chan_pin/HomeView.vue') },
        {
          path: 'detail',
          component: () => import('@/views/jin_rong_chan_pin/DetailView.vue')
        }
      ]
    },
    {
      path: '/rzfw',
      component: LayoutView,
      children: [
        { path: '', component: () => import('@/views/rong_zi_fu_wu/HomeView.vue') },
        {
          path: 'detail',
          component: () => import('@/views/rong_zi_fu_wu/DetailView.vue')
        }
      ]
    },
    {
      path: '/tzjg',
      component: LayoutView,
      children: [
        { path: '', component: () => import('@/views/tou_zi_ji_gou/HomeView.vue') },
        {
          path: 'detail',
          component: () => import('@/views/tou_zi_ji_gou/DetailView.vue')
        }
      ]
    },
    {
      path: '/qyhx',
      component: LayoutView,
      children: [{ path: '', component: () => import('@/views/qi_ye_hua_xiang/HomeView.vue') }]
    },
    {
      path: '/zczx',
      component: LayoutView,
      children: [
        { path: '', component: () => import('@/views/zheng_ce_zi_xun/HomeView.vue') },
        {
          path: 'detail',
          component: () => import('@/views/zheng_ce_zi_xun/DetailView.vue')
        }
      ]
    },
    {
      path: '/czzy',
      component: LayoutView,
      children: [
        { path: '', component: () => import('@/views/cao_zuo_zhi_yin/HomeView.vue') },
        {
          path: 'detail',
          component: () => import('@/views/cao_zuo_zhi_yin/DetailView.vue')
        }
      ]
    }
  ]
})

export default router
